// xstddef standard header
#ifndef _XSTDDEF_
#define _XSTDDEF_
#ifndef _YVALS
 #include <yvals.h>
#endif /* _YVALS */

#include <cstddef>
_STD_BEGIN

		// EXCEPTION MACROS

 #if _HAS_EXCEPTIONS
 #define _TRY_BEGIN	try {
 #define _CATCH(x)	} catch (x) {
 #define _CATCH_ALL	} catch (...) {
 #define _CATCH_END	}

 #define _RAISE(x)	throw (x)
 #define _RERAISE	throw

 #define _THROW0()	throw ()
 #define _THROW1(x)	throw (x)
 #define _THROW(x, y)	throw x(y)

 #else /* _HAS_EXCEPTIONS */
 #define _TRY_BEGIN	{{
 #define _CATCH(x)	} if (0) {
 #define _CATCH_ALL	} if (0) {
 #define _CATCH_END	}}

 #if __GNUC__ < 3 && !defined(__APPLE__) && !defined(__MINGW32__)
  #define _RAISE(x)	_XSTD _Throw(x)

 #else /* __GNUC__ < 3 && !defined(__APPLE__) && !defined(__MINGW32__) */
  #define _RAISE(x)	::std:: _Throw(x)
 #endif /* __GNUC__ < 3 && !defined(__APPLE__) && !defined(__MINGW32__) */

 #define _RERAISE

 #define _THROW0()
 #define _THROW1(x)
 #define _THROW(x, y)	x(y)._Raise()
 #endif /* _HAS_EXCEPTIONS */

		// typename KEYWORD
/*  #define _TEMPLATE	template<> */

 #ifndef _TEMPLATE_STAT
/*   #define _TEMPLATE_STAT	template<> */
 #endif /* */

 #ifndef _TEMPLATE_MEMBER
/*   #define _TEMPLATE_MEMBER	template */
 #endif /* _TEMPLATE_MEMBER */

		// BITMASK MACROS
 #define _BITMASK(Enum, Ty)	typedef Enum Ty

 #define _BITMASK_OPS(Ty) \
inline Ty& operator&=(Ty& _Left, Ty _Right) \
	{	/* return _Left &= _Right */ \
	_Left = (Ty)((int)_Left & (int)_Right); return _Left; \
	} \
\
inline Ty& operator|=(Ty& _Left, Ty _Right) \
	{	/* return _Left |= _Right */ \
	_Left = (Ty)((int)_Left | (int)_Right); return _Left; \
	} \
\
inline Ty& operator^=(Ty& _Left, Ty _Right) \
	{	/* return _Left &= _Right */ \
	_Left = (Ty)((int)_Left ^ (int)_Right); return _Left; \
	} \
\
inline Ty operator&(Ty _Left, Ty _Right) \
	{	/* return _Left & _Right */ \
	return ((Ty)((int)_Left & (int)_Right)); \
	} \
\
inline Ty operator|(Ty _Left, Ty _Right) \
	{	/* return _Left | _Right */ \
	return ((Ty)((int)_Left | (int)_Right)); \
	} \
\
inline Ty operator^(Ty _Left, Ty _Right) \
	{	/* return _Left ^ _Right */ \
	return ((Ty)((int)_Left ^ (int)_Right)); \
	} \
\
inline Ty operator~(Ty _Left) \
	{	/* return ~_Left */ \
	return ((Ty)~(int)_Left); \
	}

		// MISCELLANEOUS MACROS
#define _DESTRUCTOR(ty, ptr)	(ptr)->~ty()
#define _MESG(str)	str
#define _PROTECTED	protected

 #define _TDEF(x)		= x
 #define _TDEF2(x, y)	= x, y

 #define _STCONS(ty, name, val)	static const ty name = (ty)(val)

 #ifndef _XSTD
  #define _X_STD_BEGIN	_STD_BEGIN
  #define _X_STD_END	_STD_END
  #define _XSTD	_STD /* LEAVE SPACE */
 #endif /* _XSTD */

		// TYPE DEFINITIONS
enum _Uninitialized
	{	// tag for suppressing initialization
	_Noinit};
_STD_END
#endif /* _XSTDDEF_ */

/*
 * Copyright (c) 1992-2003 by P.J. Plauger.  ALL RIGHTS RESERVED.
 * Consult your license regarding permissions and restrictions.
V4.02:1422 */
